Skip to content

Fix: preserve Wi-Fi signal during network polling - #897

Open
nborodikhin wants to merge 1 commit into
LoveRetro:mainfrom
nborodikhin:fix/wifi-status-cache
Open

nborodikhin wants to merge 1 commit into
LoveRetro:mainfrom
nborodikhin:fix/wifi-status-cache

Conversation

@nborodikhin

@nborodikhin nborodikhin commented Nov 12, 2026 •

Copy link
Copy Markdown

Description

Issue: sometimes Wi-Fi indicator disappears from the status bar although connection is strong.

Investigation:

  • Background thread periodically updates wifi connection state:
    • PLAT_wifiConnection() sets connection_info->rssi = -1 before running iw dev link and sets it to the read value after the call comples.
  • UI thread read PLAT_connectionStrength() which reads from the same connection_info struct.
  • As a result, UI that reads a value while iw dev link was running gets rssi == -1 which is treated as SIGNAL_STRENGTH_OFF.
// returns connection info, if currently connected.
int PLAT_wifiConnection(struct WIFI_connection *connection_info);
...
#define WIFI_connectionInfo PLAT_wifiConnection

Change

  1. Collect Wi-Fi query results into a local variable inside PLAT_getNetworkStatus() on all platforms - tg5040, tg5050, and h700.
  2. Copy the completed result into connection after the call.

Testing

Experiment setup:

Version Elapsed Total calls Distinct widths Calls at 254 px Calls at 203 px
Before Wi-Fi fix 10.000112 s 10,811 2 10,786 25
With Wi-Fi fix 10.000745 s 10,963 1 10,963 0

@nborodikhin
nborodikhin marked this pull request as ready for review November 13, 2026 02:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant